package com.sf.shiva.oms.jstorm.common.cfgmanage;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 
 * 描述：
 *
 * <pre>HISTORY
 * ****************************************************************************
 *  ID   DATE           PERSON          REASON
 *  1    2018年4月4日      01369626         Create
 * ****************************************************************************
 * </pre>
 * @author 01369626
 * @since 1.0
 */
@Component
public class CustomTopologyProperties implements Serializable{
    
    /**  */
    private static final long serialVersionUID = -5486954387857741713L;
    
    @Value("${custom.topology.workerNum:1}")
    private int workerNum;
    @Value("${custom.topology.spout.threadNum:4}")
    private int spoutThreadNum;
    @Value("${custom.topology.calBolt.threadNum:1}")
    private int calBoltThreadNum;
    @Value("${custom.topology.sendKafkaBolt.threadNum:1}")
    private int sendKafkaBoltThreadNum;
    @Value("${custom.topology.max.spout.pending:1000}")
    private int maxSpoutPending;
    @Value("${javaOpts}")
    private String javaOpts;//jvm运行配置
    @Value("${custom.topology.debugFlag}")
    private boolean debugFlag;
    @Value("${custom.topology.timeout.seconds:60}")
    private int messageTimeoutSeconds;
    
    public int getWorkerNum() {
        return workerNum;
    }
    public void setWorkerNum(int workerNum) {
        this.workerNum = workerNum;
    }
    public String getJavaOpts() {
        return javaOpts;
    }
    public void setJavaOpts(String javaOpts) {
        this.javaOpts = javaOpts;
    }
    public int getSpoutThreadNum() {
        return spoutThreadNum;
    }
    public void setSpoutThreadNum(int spoutThreadNum) {
        this.spoutThreadNum = spoutThreadNum;
    }
    public int getCalBoltThreadNum() {
        return calBoltThreadNum;
    }
    public void setCalBoltThreadNum(int calBoltThreadNum) {
        this.calBoltThreadNum = calBoltThreadNum;
    }
    public int getSendKafkaBoltThreadNum() {
        return sendKafkaBoltThreadNum;
    }
    public void setSendKafkaBoltThreadNum(int sendKafkaBoltThreadNum) {
        this.sendKafkaBoltThreadNum = sendKafkaBoltThreadNum;
    }
    public int getMaxSpoutPending() {
        return maxSpoutPending;
    }
    public void setMaxSpoutPending(int maxSpoutPending) {
        this.maxSpoutPending = maxSpoutPending;
    }
    public boolean isDebugFlag() {
        return debugFlag;
    }
    public void setDebugFlag(boolean debugFlag) {
        this.debugFlag = debugFlag;
    }
    public int getMessageTimeoutSeconds() {
        return messageTimeoutSeconds;
    }
    public void setMessageTimeoutSeconds(int messageTimeoutSeconds) {
        this.messageTimeoutSeconds = messageTimeoutSeconds;
    }
    
    
}
